<div class="dux-order-status">
    <!--if{$orderStep == 1}-->
    <div class="img"><img src="{$sysPublic}/member/images/cart/wait_icon.png" alt=""></div>
    <div class="info">
        <div class="title">等待付款</div>
        <div class="desc">请您尽快付款，卖家会尽快发货</div>
    </div>
    <!--{/if}-->
    <!--if{$orderStep == 2}-->
    <div class="img"><img src="{$sysPublic}/member/images/cart/wait_icon.png" alt=""></div>
    <div class="info">
        <div class="title">等待发货</div>
        <div class="desc">请您尽快付款，卖家会尽快发货</div>
    </div>
    <!--{/if}-->
    <!--if{$orderStep == 3}-->
    <div class="img"><img src="{$sysPublic}/member/images/cart/time_icon.png" alt=""></div>
    <div class="info">
        <div class="title">卖家已发货</div>
        <div class="desc">收到货物后请及时签收</div>
    </div>
    <!--{/if}-->
    <!--if{$orderStep == 4}-->
    <div class="img"><img src="{$sysPublic}/member/images/cart/success_icon.png" alt=""></div>
    <div class="info">
        <div class="title">交易成功</div>
        <div class="desc">卖家将收到您的货款</div>
    </div>
    <!--{/if}-->
</div>

<div class="dux-box am-cf">
    <div class="box-content">
        {$info.receive_name} {$info.receive_tel}
        <p>{$info.receive_province}{$info.receive_city}{$info.receive_region}{$info.receive_address}</p>
        <p>
            合计 <span class="am-text-danger">￥{$info.total_price}</span>
            <!--loop{$info.order_currency as $k => $v}-->
            <!--if{$v.pay_type || !$v.type}-->
            + <span class="am-text-danger">{$v.amount}</span>{$v.name}
            <!--{else}-->
            + (<span class="am-text-danger">{$v.money}</span>元/<span class="am-text-danger">{$v.amount}</span>{$v.name})
            <!--{/if}-->
            <!--{/loop}-->
            (含运费￥{$info.delivery_price})
        </p>
    </div>
</div>
<!--if{$deliveryInfo}-->
<div class="dux-box am-cf">
    <div class="dux-table-cell am-vertical-align-middle am-padding-sm">
        <i class="am-icon-truck dux-text-disabled"></i>
    </div>
    <div class="box-content dux-table-cell">
        快递公司 : {$deliveryInfo.delivery_name}
        <br>
        快递单号 : {$deliveryInfo.delivery_no}
    </div>
    <div class="box-content">
        <a href="{url('order/Order/delivery', ['order_no' => $info.order_no])}" class="am-btn am-btn-danger am-btn-sm">查看物流</a>
    </div>
</div>
<!--{/if}-->

<div class="dux-pro-list">
    <div class="order-head am-cf">
        <div class="am-fl">订单号: {$info.order_no}</div>
        <div class="am-fr am-text-danger">{$info.status_data.name}</div>
    </div>
    <!--loop{$orderGoods as $k => $item}-->
    <div class="am-cf dux-pro-item">
        <div class="item-img">
            <a href="{$item.goods_url}"><img src="{$item.goods_image}"></a>
        </div>
        <div class="item-info">
            <div class="title"><a href="{$item.goods_url}">{$item.goods_name}</a></div>
            <p>
                <!--if{$item.goods_options }-->
                <!--loop{$item.goods_options as $v}-->
                {$v.value}
                <!--{/loop}-->
                <!--{/if}-->
            </p>
            <!--if{$item.service_status == 1}-->
            <p class="am-text-warning">售后处理中</p>
            <!--{/if}-->
            <!--if{$item.service_status == 2}-->
            <p class="am-text-success">售后完成</p>
            <!--{/if}-->
            <p class="price">
                {$item.goods_price}元
                <!--if{$item.goods_currency}-->
                {$item.goods_currency.type ? '/' : '×'} {$item.goods_currency.amount}{$item.goods_currency.name}
                <!--{/if}-->
                × {$item.goods_qty}
            </p>

        </div>
    </div>
    <div class="dux-order-btn">
        <!--if{$info.status_data.action == 'parcel' || $info.status_data.action == 'delivery' || $info.status_data.action == 'receive'}-->
        <!--if{!$item.service_status}-->
        <a href="javascript:;" class="am-btn am-btn-default am-btn-xs" data-service="{$item.id}">申请售后</a>
        <!--{/if}-->

        <!--{/if}-->

        <!--if{$info.status_data.action == 'comment' || $info.status_data.action == 'complete'}-->
        <!--if{!$item.comment_status}-->
        <a href="{url('order/comment/push', ['id' => $item.id, 'action' => url('', ['order_no' => $info.order_no])])}"
           class="am-btn am-btn-default am-btn-xs">评价商品</a>
        <!--{/if}-->
        <!--{/if}-->
    </div>
    <!--{/loop}-->


    <div class="order-foot">
    </div>
    <div class="order-opt">
        {$info.status_data.html}

    </div>
</div>

<div class="dux-box am-padding">
    <p>订单编号：{$info.order_no}</p>
    <p>创建时间：{date('Y-m-d H:i:s', $info.order_create_time)}</p>
    <p>付款时间：{date('Y-m-d H:i:s', $payInfo.time)}</p>
    <!--if{$deliveryInfo}-->
    <p>发货时间：{date('Y-m-d H:i:s', $deliveryInfo.time)}</p>
    <!--{/if}-->
    <!--if{$deliveryInfo}-->
    <p>成交时间：{date('Y-m-d H:i:s', $info.order_complete_time)}</p>
    <!--{/if}-->
</div>

<div class="dux-timeline dux-box">
    <!--if{empty($logList)}-->
    <dl>
        暂无订单记录
    </dl>
    <!--{/if}-->
    <!--loop{$logList as $vo}-->
    <dl class="am-cf">
        <dd>{$vo.msg}</dd>
        <dt>{date('Y-m-d H:i:s', $vo.time)}</dt>
    </dl>
    <!--{/loop}-->
</div>

<script type="text/html" id="tpl">
    <div class="am-modal-actions" id="service">
        <div class="am-modal-actions-group">
            <ul class="am-list">
                <li>
                    <a href="{url('order/refund/push')}?id={{d.id}}">申请退款</a>
                </li>
                <li>
                    <a href="{url('order/return/push')}?id={{d.id}}">申请退货</a>
                </li>
            </ul>
        </div>
        <div class="am-modal-actions-group">
            <button class="am-btn am-btn-danger am-btn-block" data-am-modal-close>取消</button>
        </div>
    </div>
</script>
<script>
    Do('base', 'tpl', function () {
        $('[data-service]').on('click', function () {
            var tpl = $('#tpl').html();
            var data = {
                id: $(this).data('service')
            };
            laytpl(tpl).render(data, function (html) {
                $(html).appendTo('body').modal().on('closed.modal.amui', function () {
                    $(this).remove();
                });
            });
        });
    });
</script>

</html>